<?php
/**
 * 测试操作记录接口
 * 使用方法：php test_operation_records.php
 */

// 模拟请求参数
$testParams = [
    'order_id' => 123,
    'order_type' => 'order',
    'pageIndex' => 1,
    'pageSize' => 10
];

echo "测试操作记录接口参数：\n";
echo "order_id: " . $testParams['order_id'] . "\n";
echo "order_type: " . $testParams['order_type'] . "\n";
echo "pageIndex: " . $testParams['pageIndex'] . "\n";
echo "pageSize: " . $testParams['pageSize'] . "\n";

echo "\n接口路径：GET /admin/order/operationRecords\n";
echo "请求参数：\n";
foreach ($testParams as $key => $value) {
    echo "  {$key}: {$value}\n";
}

echo "\n预期返回格式：\n";
echo "{\n";
echo "  \"code\": 0,\n";
echo "  \"message\": \"success\",\n";
echo "  \"data\": {\n";
echo "    \"list\": [\n";
echo "      {\n";
echo "        \"id\": 1,\n";
echo "        \"user_id\": 1,\n";
echo "        \"operate\": \"创建订单\",\n";
echo "        \"user_type\": 1,\n";
echo "        \"content\": \"订单创建成功\",\n";
echo "        \"create_time\": \"2025-01-27 10:00:00\",\n";
echo "        \"user_name\": \"管理员\"\n";
echo "      }\n";
echo "    ],\n";
echo "    \"total\": 1\n";
echo "  }\n";
echo "}\n";

echo "\n功能说明：\n";
echo "1. 获取指定订单的所有操作记录\n";
echo "2. 支持分页查询\n";
echo "3. 支持按订单类型过滤\n";
echo "4. 返回操作人信息\n";
echo "5. 按时间倒序排列\n";
